package Impl;

import java.util.ArrayList;
import Model.*;
import Cloth.*;

/**
 * 让所有人飞起来
 */
public class Facade {
    private ArrayList<Person> personList;

    public Facade(ArrayList list) {
        this.personList = list;
    }

    public void FlyActive(){
        for(Person p:personList){
            p.display();
            p.performFly();
        }
    }

    public void changeRainClothActive(){
        for(Person p:personList){
            //p.setCloth(3);
            System.out.print("i am "+ p.getType());
            Decorator decorator = new RainCloth(new Person());
            decorator.showCloth2();
        }
    }
}
